package com.lepan.ovgms.manages;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import com.lepan.ovgms.R;
import com.lepan.ovgms.manages.apply.ApplyActivity;
import com.lepan.ovgms.manages.car.CarActivity;
import com.lepan.ovgms.manages.dirver.DirverActivity;

/**
 * Created by pc on 2016/4/28.
 */
public class ManagesActivity extends Activity implements View.OnClickListener {

    private RelativeLayout mApply;
    private RelativeLayout mSirver;
    private RelativeLayout mCar;
    private RelativeLayout mOther;

    public static void startManagesActivity(Context context) {
        Intent intent = new Intent(context, ManagesActivity.class);
        context.startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_manages);

        mApply = (RelativeLayout) findViewById(R.id.bt_apply);
        mSirver = (RelativeLayout) findViewById(R.id.bt_sirver);
        mCar = (RelativeLayout) findViewById(R.id.bt_car);
        mOther = (RelativeLayout) findViewById(R.id.bt_other);
        mApply.setOnClickListener(this);
        mSirver.setOnClickListener(this);
        mCar.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.bt_apply:
                Intent intent = new Intent(ManagesActivity.this, ApplyActivity.class);
                startActivity(intent);
                break;
            case R.id.bt_sirver:
                Intent intent2 = new Intent(ManagesActivity.this, DirverActivity.class);
                startActivity(intent2);
                break;
            case R.id.bt_car:
                Intent intent3 = new Intent(ManagesActivity.this, CarActivity.class);
                startActivity(intent3);
                break;
            case R.id.bt_other:
                Intent intent4 = new Intent(ManagesActivity.this, CarActivity.class);
                startActivity(intent4);
                break;
        }
    }
}
